package com.spring.springaop.test01;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * @Import AspectJAutoProxyRegistrar 给容器导入组件，为了注册 org.springframework.aop.config.internalAutoProxyCreator  这个类
 *
 * AnnotationAwareAspectJAutoProxyCreator
 */
@EnableAspectJAutoProxy
@Configuration
public class MainConfigAOP {

	@Bean
	public MathCalculator mathCalculator(){
		return new MathCalculator();
	}

	@Bean
	public LogAspects logAspects(){
		return new LogAspects();
	}

}
